package html;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

public class jsoupHtml {
	public static void main(String[] args) {
		try {

			/*
			 * Map<String, String> map2 = new HashMap<>(); map2.put("sessionid",
			 * "2f8cae655c1a9841cf29764422c4d96a"); Response response2 =
			 * Jsoup.connect("http://toutiao.com/api/favorites").timeout(20000).
			 * cookies(map2)// 这个就是上面获取的cookies
			 * .ignoreContentType(true).execute();
			 * System.out.println(response2.body());
			 */
			Document document = Jsoup.connect("http://toutiao.com/group/6302535723271094529/").timeout(10000).get();
			Element element = document.getElementsByClass("article-content").get(0);
			System.out.println(element.html());

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
